﻿using System.Xml.Linq;

namespace SchemaGen.Xsd
{
    public class SDocumentation
    {
        public string Comment { get; set; }

        internal XElement Create()
        {
            var result = new XElement(SNames.Elements.Annotation,
                new XElement(SNames.Elements.Documentation,
                    Comment));

            return result;
        }

        public static implicit operator SDocumentation(string comment)
        {
            return new SDocumentation
            {
                Comment = comment
            };
        }
    }
}
